package clustering.framework;

public class TrinityRandom {
	int k;
	Object rand = null;
	public TrinityRandom(int k)
	{
		this.k = k;

		if(k%2 == 1)
		{
			rand = new java.util.Random();
		}
		else 
		{
			rand = new MT();
		}

		/*
	
		if(k%3 == 0)
		{
			rand = new java.util.Random();
		}
		else if(k%3 == 1)
		{
			rand = new MT();
		}
		else
		{
			rand = new R250_521();
		}*/
	}
	
	public int nextInt(int upperLimit)
	{
		if(k%2 == 1)
		{
			return ((java.util.Random)rand).nextInt(upperLimit);
		}
		else
		{
			return ((MT)rand).nextInt(upperLimit);
		}
	}
}
